/**
 * Created with IntelliJ IDEA
 * Description
 * User:user
 * Date:2021-10-21
 * Time:14:35
 */
//一个文件夹下的类都可以使用
//递归的时间复杂度 =递归的次数 * 每次递归需要执行的次数
//满二叉树的总结点个数为2^N-1
//斐波拉契数列的求和的时间复杂度为O（n）
public class TestDemo {

    public static void main(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.createLinkedList();
        myLinkedList.show();
        System.out.println("");
        System.out.println(myLinkedList.getSize());

    }
    public static void main1(String[] args) {
        MyArryList myArryList = new MyArryList();
        myArryList.add(0,1);
        myArryList.add(1,2);
        myArryList.add(2,3);

        //myArryList.add(4,4);中间不能有空位置
        //myArryList.add(-3,4);下标不能是负数
        //myArryList.add(5,4);下标越界


        myArryList.add(3,4);
        myArryList.add(4,5);
        myArryList.display();
        myArryList.add(5,6);
        myArryList.display();

//        System.out.println(myArryList.contains(4));
//        System.out.println(myArryList.contains(7));
//        System.out.println(myArryList.search(7));
//        System.out.println(myArryList.search(4));
//        System.out.println(myArryList.getPos(0));
//        System.out.println(myArryList.getPos(1));
//        System.out.println(myArryList.getPos(2));
//        System.out.println(myArryList.getPos(3));
//        //System.out.println(myArryList.getPos(-1));
//        System.out.println(myArryList.getPos(4));
//        System.out.println(myArryList.usedSize);

        myArryList.setPos(0,100);
        myArryList.display();
        myArryList.clear();
        myArryList.display();

    }
}
